﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SimpleCADControl
{
    public partial class LayerNumber : Form
    {
        public int Number
        {
            get
            {
                return (int)numericUpDownLayerNumber.Value;
            }
            set
            {
                numericUpDownLayerNumber.Value = value;
            }
        }
        public LayerNumber()
        {
            InitializeComponent();
        }

        private void btnOk_Click(object sender, EventArgs e)
        {
            DialogResult = System.Windows.Forms.DialogResult.OK;
            Close();
        }

        protected override bool ProcessCmdKey(ref Message msg, Keys keyData)
        {
            if (keyData == Keys.Enter || keyData == Keys.Return)
            {
                btnOk.PerformClick();
            }
            return base.ProcessCmdKey(ref msg, keyData);
        }
    }
}
